package com.lychee.moli.service.serviceimpl;

import com.lychee.moli.dao.IUserDao;
import com.lychee.moli.entity.UserInfoEntity;
import com.lychee.moli.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Lychee on 2018/4/9 11:37.
 * <p>
 * Author:Hejingzhou
 * <p>
 * Email:tcowork@163.com
 */
@Service
public class UserServiceImpl implements IUserService {

    @Resource
    private IUserDao iUserDao;

    /**
     * 用户注册
     *
     * @param userInfoEntity 新用户信息
     * @return
     */
    public int registerUser(UserInfoEntity userInfoEntity) {
        return iUserDao.insertUser(userInfoEntity);
    }

    /**
     * 用户登录
     *
     * @param userName
     * @param password
     * @return
     */
    public UserInfoEntity login(String userName, String password) {
        return iUserDao.login(userName, password);
    }
}
